#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>

int hello_dri_probe(struct platform_device* ppdev){
	printk("Call function hello_dri_probe\n");
	return 0;
}

int hello_dri_remove(struct platform_device* ppdev){
	printk("Call function hello_dri_remove\n");
	return 0;
}

struct platform_device_id hello_dri_ids[] = {
	[0] = {.name = "hello"},
	[1] = {.name = "world"},
	[2] = {},

};

struct platform_driver hello_dri={
	.probe = hello_dri_probe,
	.remove = hello_dri_remove,
	.driver = {
		.name = "hello world",
		.owner = THIS_MODULE,
	},
	.id_table = hello_dri_ids,
};

int __init hello_dri_init(void){

	platform_driver_register(&hello_dri);

	return 0;
}

module_init(hello_dri_init);

void __exit hello_dri_exit(void){
	platform_driver_unregister(&hello_dri);
}

module_exit(hello_dri_exit);

MODULE_LICENSE("GPL");

